package com.xjtu.platform.security.login.imply;

import com.xjtu.platform.security.login.LoginDto;
import com.xjtu.platform.security.login.LoginService;
import com.xjtu.platform.security.login.dao.LoginDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @创建人 MBY381
 * @创建时间 2022/6/29 11:41
 * @描述 暂无
 */

@Service
@Transactional
public class LoginServiceImply implements LoginService {

    @Resource
    private LoginDao loginDao;

    @Override
    public boolean checkLogin(LoginDto dto) {
        int count = loginDao.checkLogin(dto);
        System.out.println(count);
        return count > 0;
    }

    @Override
    public String findWeb(LoginDto dto) {
        return loginDao.finWebById(dto);
    }

    @Override
    public boolean checkEmail(String user_id) {
        int count = loginDao.getEmail(user_id);
        return count>0;
    }

}
